<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<link rel="stylesheet" type="text/css" href="../../js/lib/theme-chalk/index.css"/>
		<link rel="stylesheet" type="text/css" href="../../css/myCustomer.css"/>
		<link rel="stylesheet" type="text/css" href="../../css/my_commont.css" />
		<link rel="stylesheet" type="text/css" href="index.css" />
	
		<script src="../../common/utilCookie.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../common/author.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/vue.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/axios.min.js"></script>
		<script src="../../js/jquery.js" type="text/javascript" charset="utf-8"></script>
		<!-- 引入组件库 -->
		<script src="../../js/lib/index.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../common/judegetEmpty.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/aixos-init.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../js/config.js" type="text/javascript" charset="utf-8"></script>
		<script src="index.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			[v-cloak] {
				display: none;
			}
		</style>
	</head>
	<body>
		<div id="permissionListApp" v-cloak>
			<div class="contaner" v-loading.fullscreen.lock="fullscreenLoading">
				<div class="section-header">
					权限- -管理员列表
				</div>
				<hr class="hr-style" />
				<div class="my_height_20">
                     <el-table :data="tableData" border style="width: 100%" >
                     	
						<el-table-column prop="registDate" label="创建时间" >
                     	</el-table-column>
                     	<el-table-column prop="nickname" label="昵称">
                     	</el-table-column>
						<el-table-column prop="username" label="账号">
						</el-table-column>
                     	<el-table-column prop="password" label="密码" >
					    </el-table-column>
						<el-table-column prop="grade" label="权限" >
							<template slot-scope="scope">
							   <div v-if="scope.row.grade == 0">
							   	   管理员
							   </div>
							   <div v-else-if="scope.row.grade == 1">
							   	   总管
							   </div>
							   <div v-else-if="scope.row.grade == 2">
							   	   店长
							   </div>
							   <div v-else>
							   	   其他
							   </div>
							</template>	
						</el-table-column>
						
                     	<el-table-column label="操作" width="300px">
                     		<template slot-scope="scope">
                     			<el-button size="mini"  type="danger" @click="handleDelete(scope.row)">删除</el-button>
                     			<el-button size="mini"  @click="handleEdit(scope.row)">修改密码</el-button>
								<el-button size="mini"  @click="handleEditGrade(scope.row)">修改权限</el-button>
                     		</template>
                     	</el-table-column>
                     </el-table>
					
				</div>
			    <div class="my_height_20">
			     	<el-dialog title="修改密码" :visible.sync="dialogFormVisible" width="400px">
			     	  <el-form :model="editForm">
			     	    <el-form-item label="新密码" :label-width="formLabelWidth">
			     	      <el-input v-model="editForm.password" autocomplete="off"></el-input>
			     	    </el-form-item>
			     	    <el-form-item label="确认密码" :label-width="formLabelWidth">
			     	      <el-input v-model="editForm.configPassword" autocomplete="off"></el-input>
			     	    </el-form-item>
						
			     	  </el-form>
			     	  <div slot="footer" class="dialog-footer">
			     	    <el-button @click="dialogFormVisible = false">取 消</el-button>
			     	    <el-button type="primary" @click="configEditPassword">确 定</el-button>
			     	  </div>
			     	</el-dialog>
			     </div>
				 <div class="my_height_20">
				  	<el-dialog title="修改权限" :visible.sync="dialogGradeFormVisible" width="440px">
				  	  <el-form :model="editForm">
				  	    <el-form-item label="权限 " :label-width="formLabelWidth">
				  	     <el-radio-group v-model="editForm.grade">
				  	         <el-radio :label="1">总管</el-radio>
				  	         <el-radio :label="2">店长</el-radio>
				  	         <el-radio :label="3">其他</el-radio>
				  	       </el-radio-group>
				  	    </el-form-item>
				  	  </el-form>
				  	  <div slot="footer" class="dialog-footer">
				  	    <el-button @click="dialogGradeFormVisible = false">取 消</el-button>
				  	    <el-button type="primary" @click="configEditGrade">确 定</el-button>
				  	  </div>
				  	</el-dialog>
				  </div>
			</div>
		</div>
	</body>
</html>
